home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / slalsd.z / slalsd
Encoding:
Text File  |  2002-10-03  |  6.3 KB  |  199 lines

  1.  
  2.  
  3.  
  4. SSSSLLLLAAAALLLLSSSSDDDD((((3333SSSS))))                                                          SSSSLLLLAAAALLLLSSSSDDDD((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SLALSD - use the singular value decomposition of A to solve the least
  10.      squares problem of finding X to minimize the Euclidean norm of each
  11.      column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-
  12.      by-NRHS
  13.  
  14. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.      SUBROUTINE SLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND, RANK,
  16.                         WORK, IWORK, INFO )
  17.  
  18.          CHARACTER      UPLO
  19.  
  20.          INTEGER        INFO, LDB, N, NRHS, RANK, SMLSIZ
  21.  
  22.          REAL           RCOND
  23.  
  24.          INTEGER        IWORK( * )
  25.  
  26.          REAL           B( LDB, * ), D( * ), E( * ), WORK( * )
  27.  
  28. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  29.      These routines are part of the SCSL Scientific Library and can be loaded
  30.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  31.      directs the linker to use the multi-processor version of the library.
  32.  
  33.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  34.      4 bytes (32 bits). Another version of SCSL is available in which integers
  35.      are 8 bytes (64 bits).  This version allows the user access to larger
  36.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  37.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  38.      only one of the two versions; 4-byte integer and 8-byte integer library
  39.      calls cannot be mixed.
  40.  
  41. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  42.      SLALSD uses the singular value decomposition of A to solve the least
  43.      squares problem of finding X to minimize the Euclidean norm of each
  44.      column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-
  45.      by-NRHS. The solution X overwrites B. The singular values of A smaller
  46.      than RCOND times the largest singular value are treated as zero in
  47.      solving the least squares problem; in this case a minimum norm solution
  48.      is returned.  The actual singular values are returned in D in ascending
  49.      order.
  50.  
  51.      This code makes very mild assumptions about floating point arithmetic. It
  52.      will work on machines with a guard digit in add/subtract, or on those
  53.      binary machines without guard digits which subtract like the Cray XMP,
  54.      Cray YMP, Cray C 90, or Cray 2.  It could conceivably fail on hexadecimal
  55.      or decimal machines without guard digits, but we know of none.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSLLLLAAAALLLLSSSSDDDD((((3333SSSS))))                                                          SSSSLLLLAAAALLLLSSSSDDDD((((3333SSSS))))
  71.  
  72.  
  73.  
  74. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  75.      UPLO   (input) CHARACTER*1
  76.             = 'U': D and E define an upper bidiagonal matrix.
  77.             = 'L': D and E define a  lower bidiagonal matrix.
  78.  
  79.             SMLSIZ (input) INTEGER The maximum size of the subproblems at the
  80.             bottom of the computation tree.
  81.  
  82.      N      (input) INTEGER
  83.             The dimension of the  bidiagonal matrix.  N >= 0.
  84.  
  85.      NRHS   (input) INTEGER
  86.             The number of columns of B. NRHS must be at least 1.
  87.  
  88.      D      (input/output) REAL array, dimension (N)
  89.             On entry D contains the main diagonal of the bidiagonal matrix. On
  90.             exit, if INFO = 0, D contains its singular values.
  91.  
  92.      E      (input) REAL array, dimension (N-1)
  93.             Contains the super-diagonal entries of the bidiagonal matrix.  On
  94.             exit, E has been destroyed.
  95.  
  96.      B      (input/output) REAL array, dimension (LDB,NRHS)
  97.             On input, B contains the right hand sides of the least squares
  98.             problem. On output, B contains the solution X.
  99.  
  100.      LDB    (input) INTEGER
  101.             The leading dimension of B in the calling subprogram.  LDB must be
  102.             at least max(1,N).
  103.  
  104.      RCOND  (input) REAL
  105.             The singular values of A less than or equal to RCOND times the
  106.             largest singular value are treated as zero in solving the least
  107.             squares problem. If RCOND is negative, machine precision is used
  108.             instead.  For example, if diag(S)*X=B were the least squares
  109.             problem, where diag(S) is a diagonal matrix of singular values,
  110.             the solution would be X(i) = B(i) / S(i) if S(i) is greater than
  111.             RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
  112.             RCOND*max(S).
  113.  
  114.      RANK   (output) INTEGER
  115.             The number of singular values of A greater than RCOND times the
  116.             largest singular value.
  117.  
  118.      WORK   (workspace) REAL array, dimension at least
  119.             (9*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2), where NLVL
  120.             = max(0, INT(log_2 (N/(SMLSIZ+1))) + 1).
  121.  
  122.      IWORK  (workspace) INTEGER array, dimension at least
  123.             (3*N*NLVL + 11*N)
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SSSSLLLLAAAALLLLSSSSDDDD((((3333SSSS))))                                                          SSSSLLLLAAAALLLLSSSSDDDD((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      INFO   (output) INTEGER
  141.             = 0:  successful exit.
  142.             < 0:  if INFO = -i, the i-th argument had an illegal value.
  143.             > 0:  The algorithm failed to compute an singular value while
  144.             working on the submatrix lying in rows and columns INFO/(N+1)
  145.             through MOD(INFO,N+1).
  146.  
  147. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  148.      Based on contributions by
  149.         Ming Gu and Ren-Cang Li, Computer Science Division, University of
  150.           California at Berkeley, USA
  151.         Osni Marques, LBNL/NERSC, USA
  152.  
  153.  
  154. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  155.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  156.  
  157.      This man page is available only online.
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.